﻿@{
    if ((bool)ViewData["contains"])
    {
         ViewBag.Page = "person";
         Layout = "~/Views/Shared/_PersionLayout.cshtml";
         ViewBag.Menu = "modifypassword";
        @section HeadJavaScript{
            <script src="~/Scripts/angular/base/angular.min.js" type="text/javascript"></script>
            <!--[if (IE 6)|(IE 7)]><script type="text/javascript" src="~/Scripts/angular/base/json2.js"></script><![endif]-->
            <script src="~/Scripts/angular/js/modifypassword.js" type="text/javascript"></script>
            <script src="~/Scripts/angular/base/angular.autoload.js" type="text/javascript"></script>
        }
        <div class="pos"><img src="~/images/images/pay_dian.jpg" /> <a href="#">会员中心</a> - 修改密码</div>
        <div ng-controller="Ctrl">
            <div class="form1" ng-hide="submit.success" style="background:none;">
			    <form name="form" on-submit="submit()" onsubmit="return false;" ng-init="load({
                    old: { msg:'请输入当前密码',required:'请输入当前密码！',minlength: '对不起，您设置的密码太短，密码长度为6-14位！', maxlength: '对不起，您设置的密码太长，密码长度为6-14位！', pattern: '密码格式错误！！',success:true}
                    ,password: { msg:'请输入新密码',required:'请输入新密码！',minlength: '对不起，您设置的密码太短，密码长度为6-14位！', maxlength: '对不起，您设置的密码太长，密码长度为6-14位！', pattern: '密码格式错误！！',success:true}
                    ,confirm: {  required:'请填写确认密码',error: '与输入密码不一致',success:true}
                    ,verifyvalue: { msg:'请输入图片显示的数字或字母',error: '请正确填写验证码',success:true}
                    ,submit:{verifycode:'验证码错误',account:'修改密码失败，请输入当前正确的密码',resource:'系统错误，请联系管理员',identity:'用户身份错误,请重新登录',error:'系统异常，请联系我们'}
                });
                    submit.url = '/account/modifypassword/@ViewData["code"]';
                "
                >


                <table class="tab1" width="720">
                    <tr>
                        <td width="115"><span class="txtr">当前密码：</span> </td>
                        <td width="270">
                            <input class="text270" type="password" name="old" ng-init="old.input()" on-focus="old.input()" ng-model="old.value" on-blur="old.validate()" ng-pattern="old.pattern" ng-minlength="6" ng-maxlength="14" required/>
						    
                        </td>
                        <td>
                            <span class="label2" ng-show="!old.error&&!old.success&&old.msg" style="display:none;">{{old.msg}}</span>
						    <span class="error" ng-show="old.error" style="display:none;"><img src="~/images/images/error.jpg"> {{old.error}}</span>
						    <span ng-show="old.success" style="display:none;"><img src="~/images/images/right.jpg"></span>
                        	<!--<span>请输入正确的答案！</span>-->
                        </td>
                    </tr>
                    <tr>
                        <td><span class="txtr">输入新密码：</span> </td>
                        <td>
                            <input class="text270" type="password" name="password" ng-init="password.input()" on-focus="password.input()" ng-model="password.value" on-blur="password.validate()" ng-pattern="password.pattern" ng-minlength="6" ng-maxlength="14" required/>
						    
                        </td>
                        <td>
                            <span class="label2" ng-show="!password.error&&!password.success&&password.msg" style="display:none;">{{password.msg}}</span>
						   <span class="error" ng-show="password.error" style="display:none;"><img src="~/images/images/error.jpg"> {{password.error}}</span>
						    <span ng-show="password.success" style="display:none;"><img src="~/images/images/right.jpg"> </span>
                        </td>
                    </tr>
                    <tr>
                        <td><span class="txtr">确认新密码：</span> </td>
                        <td>
                            <input class="text270" type="password" name="confirm" ng-init="confirm.input()" on-focus="confirm.input()" on-blur="confirm.validate();"  ng-model="confirm.value" required/>
					        
                        </td>
                        <td>
                        	<span class="label2" ng-show="!confirm.error&&!confirm.success&&confirm.msg" style="display:none;">{{confirm.msg}}</span>
						    <span class="error" ng-show="confirm.error" style="display:none;"><img src="~/images/images/error.jpg"> {{confirm.error}}</span>
						    <span ng-show="confirm.success" style="display:none;"><img src="~/images/images/right.jpg"> </span>
                        </td>
                    </tr>
                    <tr>
                        <td><span class="txtr">验证码：</span> </td>
                        <td>
                            <input  class="text270" type="text" name="verifyvalue" ng-init="verifyvalue.input()" on-focus="verifyvalue.input()" on-blur="verifyvalue.validate();" ng-model="verifyvalue.value" ng-pattern="verifyvalue.pattern" required/>
		                    
                        </td>
                        <td>
                        	<span class="label2" ng-show="!verifyvalue.error&&!verifyvalue.success&&verifyvalue.msg" style="display:none;">{{verifyvalue.msg}}</span>
						    <span class="error" ng-show="verifyvalue.error" style="display:none;"><img src="~/images/images/error.jpg"> {{verifyvalue.error}}</span>
						    <span ng-show="verifyvalue.success" style="display:none;"><img src="~/images/images/right.jpg"> </span>
                        </td>
                    </tr>
                   <tr>
                        <td><span class="txtr">验证码图片：</span> </td>
                        <td>
                        	<img ng-src="{{verifycode.value}}" ng-click="verifycode.newdefault()" alt="verifycode" style="border:1px solid #000;" /> 
                            <a ng-click="verifycode.newdefault()" style="color:#4196ff; text-decoration:none;">看不清楚，换一张 </a>
                        </td>
                        <td>
                        	
                        </td>
                    </tr>
                    <tr ng-show="submit.error" style="display:none">
                    <td></td>
                        <td colspan="2">
                        	 <span class="red">{{submit.error}}</span>
                        </td>
                    </tr>
                    <tr>
                    	<td></td>
                        <td align="center">
                        	<input type="submit" value="" class="safe_tj" />
                        </td>
                        <td></td>
                    </tr>
                </table>     
		        </form>
                <p style="margin:20px 0 0 140px;" class="c999">请妥善保管好您的密码，勿告诉他人；</p>
	        </div>

            <div class="form1" ng-show="submit.success" style="display:none;">
				<div class="already2">
					<img src="/images/old/already5.jpg" width="314" height="74" />
					<p><a href="javascript:location.reload();" class="cr-juhuang">返&nbsp;回</a></p>	
				</div>			
                <p style="margin:20px 0 0 140px;" class="c999">请妥善保管好您的密码，勿告诉他人；</p>				 
	 		</div>
   			
        </div>
    }
    else
    {
        Layout = null;
        Response.Redirect("/usercenter/login");
     }
     
}
